package cn.befory.exception;

/**
 * Created by befory on 2019/8/20.
 */
public enum ExceptionEnum {
    SUCCESS(200,"请求成功！"),
    PARAM_ERROR(406,"参数错误"),
    DATA_ERROR(600,"数据错误"),
    LOGIN_NAME_ERROR(1001,"输入的账号有误！"),
    LOGIN_NAME_AND_PASSWORD_IS_NOT_MATCH(1002,"账号和密码不匹配！"),
    TOKEN_EXPIRE(1003,"token过期，请重新登陆"),
    ;
    private int code;
    private String msg;

    ExceptionEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public ExceptionEnum setCode(int code) {
        this.code = code;
        return this;
    }

    public String getMsg() {
        return msg;
    }

    public ExceptionEnum setMsg(String msg) {
        this.msg = msg;
        return this;
    }
}
